Optimal. Leaf size=70 \[ -\frac{(5 a-4 b) \sin (e+f x) \cos (e+f x)}{8 f}+\frac{3}{8} x (a-4 b)+\frac{a \sin (e+f x) \cos ^3(e+f x)}{4 f}+\frac{b \tan (e+f x)}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0638165, antiderivative size = 70, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.238, Rules used = {4132, 455, 1157, 388, 203} \[ -\frac{(5 a-4 b) \sin (e+f x) \cos (e+f x)}{8 f}+\frac{3}{8} x (a-4 b)+\frac{a \sin (e+f x) \cos ^3(e+f x)}{4 f}+\frac{b \tan (e+f x)}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4132
Rule 455
Rule 1157
Rule 388
Rule 203
Rubi steps
\begin{align*} \int \left (a+b \sec ^2(e+f x)\right ) \sin ^4(e+f x) \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^4 \left (a+b+b x^2\right )}{\left (1+x^2\right )^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{a \cos ^3(e+f x) \sin (e+f x)}{4 f}-\frac{\operatorname{Subst}\left (\int \frac{a-4 a x^2-4 b x^4}{\left (1+x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{4 f}\\ &=-\frac{(5 a-4 b) \cos (e+f x) \sin (e+f x)}{8 f}+\frac{a \cos ^3(e+f x) \sin (e+f x)}{4 f}+\frac{\operatorname{Subst}\left (\int \frac{3 a-4 b+8 b x^2}{1+x^2} \, dx,x,\tan (e+f x)\right )}{8 f}\\ &=-\frac{(5 a-4 b) \cos (e+f x) \sin (e+f x)}{8 f}+\frac{a \cos ^3(e+f x) \sin (e+f x)}{4 f}+\frac{b \tan (e+f x)}{f}+\frac{(3 (a-4 b)) \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{8 f}\\ &=\frac{3}{8} (a-4 b) x-\frac{(5 a-4 b) \cos (e+f x) \sin (e+f x)}{8 f}+\frac{a \cos ^3(e+f x) \sin (e+f x)}{4 f}+\frac{b \tan (e+f x)}{f}\\ \end{align*}
Mathematica [A] time = 0.303466, size = 54, normalized size = 0.77 \[ \frac{12 (a-4 b) (e+f x)-8 (a-b) \sin (2 (e+f x))+a \sin (4 (e+f x))+32 b \tan (e+f x)}{32 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.046, size = 92, normalized size = 1.3 \begin{align*}{\frac{1}{f} \left ( a \left ( -{\frac{\cos \left ( fx+e \right ) }{4} \left ( \left ( \sin \left ( fx+e \right ) \right ) ^{3}+{\frac{3\,\sin \left ( fx+e \right ) }{2}} \right ) }+{\frac{3\,fx}{8}}+{\frac{3\,e}{8}} \right ) +b \left ({\frac{ \left ( \sin \left ( fx+e \right ) \right ) ^{5}}{\cos \left ( fx+e \right ) }}+ \left ( \left ( \sin \left ( fx+e \right ) \right ) ^{3}+{\frac{3\,\sin \left ( fx+e \right ) }{2}} \right ) \cos \left ( fx+e \right ) -{\frac{3\,fx}{2}}-{\frac{3\,e}{2}} \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.50531, size = 111, normalized size = 1.59 \begin{align*} \frac{3 \,{\left (f x + e\right )}{\left (a - 4 \, b\right )} + 8 \, b \tan \left (f x + e\right ) - \frac{{\left (5 \, a - 4 \, b\right )} \tan \left (f x + e\right )^{3} +{\left (3 \, a - 4 \, b\right )} \tan \left (f x + e\right )}{\tan \left (f x + e\right )^{4} + 2 \, \tan \left (f x + e\right )^{2} + 1}}{8 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.489777, size = 167, normalized size = 2.39 \begin{align*} \frac{3 \,{\left (a - 4 \, b\right )} f x \cos \left (f x + e\right ) +{\left (2 \, a \cos \left (f x + e\right )^{4} -{\left (5 \, a - 4 \, b\right )} \cos \left (f x + e\right )^{2} + 8 \, b\right )} \sin \left (f x + e\right )}{8 \, f \cos \left (f x + e\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.15206, size = 120, normalized size = 1.71 \begin{align*} \frac{3 \,{\left (f x + e\right )}{\left (a - 4 \, b\right )} + 8 \, b \tan \left (f x + e\right ) - \frac{5 \, a \tan \left (f x + e\right )^{3} - 4 \, b \tan \left (f x + e\right )^{3} + 3 \, a \tan \left (f x + e\right ) - 4 \, b \tan \left (f x + e\right )}{{\left (\tan \left (f x + e\right )^{2} + 1\right )}^{2}}}{8 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]